/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package pingouin;

import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;

/**
 *
 * @author Hippolyte
 */
public class GestionSouris extends MouseAdapter // implemente MouseListener 
{

    public static TClientCoord tcc;

    @Override
    public synchronized void mouseClicked(MouseEvent e) {
        if (Partie.serveur) {
            Partie.actionClic(e.getX(), e.getY());
        } else {
            if (tcc != null) {
                tcc.x = e.getX();
                tcc.y = e.getY();
                synchronized (tcc.awake) {
                    tcc.awake.notify();
                }
            }
        }
    }
}
